using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace BookingDB.Models.Mapping
{
    public class PriceMap : EntityTypeConfiguration<EntityPrice>
    {
        public PriceMap()
        {
            // Primary Key
            this.HasKey(t => t.id);

            // Properties
            this.Property(t => t.type)
                .HasMaxLength(30);

            // Table & Column Mappings
            this.ToTable("Prices");
            this.Property(t => t.id).HasColumnName("id");
            this.Property(t => t.type).HasColumnName("type");
            this.Property(t => t.price1).HasColumnName("price");
        }
    }
}
